home *** CD-ROM | disk | FTP | other *** search
- # NAMING CONVENTIONS
-
- CodeFileName %Rs.c # Name of .c output file for a program,
- # %s=input file name.
-
- ModuleFileName %_S.c # Name of .c output file for a module,
- # %s=input file name, %S=module name.
-
- HeaderFileName %_S.h # Name of .h output file for a module,
- # %s=input file name, %S=module name.
-
- HeaderFileName2 # If defined, different format to use when
- # generating #include's, otherwise same.
- # May be quoted as in IncludeFrom.
-
- SelfIncludeName # Format to apply after HeaderFileName to use
- # when a module includes its own header file.
-
- LogFileName %RS.log # Name of log file name for -V mode.
- # %s=input file name, %S=output file name.
-
- IncludeFileName # Format for translating Pascal include-file
- # names.
-
- IncludeOutFileName %Rs.c # Name of .c output file for an include
- # file generated in ExpandIncludes=0 mode.
-
- SymCase # 1 or default=preserve case of Pascal idents,
- # 0=convert all Pascal idents to lower case
-
- SymbolFormat # Format for C identifiers derived from
- # Pascal ones; default=%s. The following
- # specific formats override this one.
- # %s=original Pascal identifier,
- # %S=name of parent module or procedure.
-
- ConstFormat # Format for #define names derived from
- # Pascal consts. (Often used: %^s)
-
- ModuleFormat # Format for program and module names.
-
- FunctionFormat # Format for procedure and function names.
-
- VarFormat # Format for variable names.
-
- TypeFormat # Format for typedef names.
-
- FieldFormat # Format for fields of records; %S=record type.
-
- EnumFormat # Format for enumeration constants;
- # %s=enum type name. If not specified,
- # default is ConstFormat, else SymbolFormat.
-
- ReturnValueName Result # Return value holding variable; [%s=func name]
- UnitInitName _%s_init # Turbo Pascal unit initializer; %s=unit name
- HSymbolName %s_H # Name of "_H" symbol, if any; %s=unit name
- GSymbolName %s_G # Name of "_G" symbol; [%s=unit name]
- StringMaxName MAX_%s # VAR STRING hidden variable; %s=param name
- ArrayMinName %s_LOW # Lower bound hidden variable; %s=param name
- ArrayMaxName %s_HIGH # Upper bound hidden variable; %s=param name
- CopyParName %s_ # Alternate name for parameter %s
- StaticLinkName LINK # Static link parameter name; [%s=func name]
- LocalVarsStruct LOC_%s # Name of struct type for locals; %s=func name
- LocalVarsName V # Name of struct var for locals; [%s=func name]
- FwdStructName %s # Name of forward-used structs; %s=type name
- # (may simply be %s if you don't mind confusion)
- EnumListName %s_NAMES # Name of array to hold names for enum %s
- UnionName UU # Name of variant union
- UnionPartName %s # Name of variant element; %s=tag value name
- FakeStructName _REC_%s # Name of "temporary" structs; %s=base name
- LabelName _L%s # Name of GOTO label; %s=label name
- LabelVarName _JL%s # Name of GOTO label jmp_buf variable; %s=label
- TempName TEMP%s # Name of general temporary vars; %s=unique id
- DummyName DUMMY%s # Name of throwaway "dummy" vars; %s=unique id
- WithName WITH%s # Name of WITH statement temp ptr; %s=unique id
- ForName FORLIM%s # Name of FOR statement temp limit; %s=unique id
- PtrName PTR%s # Name of NIL-checking temp ptr; %s=unique id
- StringName STR%s # Name of temporary string vars; %s=unique id
- SetName SET%s # Name of temporary set vars; %s=unique id
- FNVarName %s_NAME # Name of file-name vars; %s=file var
- FNSizeName _FNSIZE # Maximum length of file name (macro or integer)
-
- TagStructs # 1=Use FakeStructName for most unnamed records
- # 0 or default=only for arrays/files of records
-
- AlternateName1 %s_ # Way to produce a second C symbol for a Pascal
- # symbol, where original symbol was %s. Default
- # is to use AlternateName with %d=1.
-
- AlternateName2 # A second alternate for %s.
-
- AlternateName # A %d'th name for %s. %s and %d may appear in
- # either order. Default is %d applications of
- # AlternateName1.
-
- ExportSymbol # Name of exported symbol %s. E.g.: "P_%s"
- # Default=%s, i.e., don't mess with the name.
- # %s is Pascal symbol name; %S is module name.
-
- Export_Symbol # Exported-symbol format to be used when the
- # symbol %s contains an '_'. Default=use
- # ExportSymbol format for every symbol.
-
- Alias # Name of external proc or var; default="%s".
- # If does not contain a "%s", this simply
- # renames the next defined symbol of any kind.
-
- Synonym # Format: Synonym name = newname
- Synonym # Treat the word "name" in the input file
- Synonym # exactly the same as the keyword or identifier
- Synonym # "newname". If "newname" is omitted, ignore
- Synonym # the word "name" in the input. For example:
- Synonym # "Synonym andthen = and" creates a keyword;
- Synonym # "Synonym allocmem = getmem" simulates a
- Synonym # built-in function "allocmem" which acts like
- Synonym # Turbo's "getmem"; "Synonym segment" ignores
- Synonym # the word "segment" in the input.
-
- NameOf # Format: NameOf name = newname
- NameOf # Rename the specified symbol. The name may
- NameOf # be of the form "modulename.name" or
- NameOf # "procname.name"; otherwise, all usages of
- NameOf # the symbol are renamed.
-
- VarMacro # Format: VarMacro varname = C-expression
- VarMacro # Must come before the declaration of variable
- VarMacro # "varname". Causes all references to the
- VarMacro # variable to use the C expression instead.
- VarMacro # In the expr, all C operators are supported;
- VarMacro # all identifier names are used verbatim.
- VarMacro # Also works for Turbo Pascal typed-constants.
- VarMacro # Suppresses declaration of variable unless
- VarMacro # "varname" appears in the C expression.
- VarMacro # Simple algebra is used for assignments to
- VarMacro # vars with expr definitions: if X -> 2*V+1,
- VarMacro # then "X:=Y" translates to "V=(Y-1)/2".
-
- ConstMacro # Analogous to VarMacro, but for constants and
- ConstMacro # enumeration constants. In an enum constant,
- ConstMacro # if the C-expression is a single name the
- ConstMacro # result is equivalent to Alias or NameOf.
-
- FieldMacro # Format: FieldMacro rec.field = C-expression
- FieldMacro # where "rec" is a record type name which
- FieldMacro # also appears in the C-expression. For
- FieldMacro # example: FieldMacro obj.foo = bar(obj) causes
- FieldMacro # the field "foo" of record type "obj" to be
- FieldMacro # referenced through the function or macro
- FieldMacro # "bar", rather than using dot notation.
-
- FuncMacro # Format: FuncMacro foo(a,b,c) = C-expression
- FuncMacro # where "a", "b", "c" are arbitrary arg names
- FuncMacro # also appearing in the C-expression. "Foo"
- FuncMacro # is a procedure or function defined or to be
- FuncMacro # defined in the code, or predefined in Pascal.
- FuncMacro # E.g.: FuncMacro PtInRect(p,r) = PtInRect(p,&r)
- FuncMacro # causes "r" to be treated as a VAR param even
- FuncMacro # though otherwise it would be passed by value.
-
- WarnMacros # 1=warn if Var/Const/Field/FuncMacro not used
- # 0 or default=don't care.
-
- SpecialMalloc # Format: SpecialMalloc x.y.z = funcname
- SpecialMalloc # where x is a type name, and y and z are
- SpecialMalloc # optional variant tags for records. The
- SpecialMalloc # statement "new(p,y,z)" where p is a pointer
- SpecialMalloc # to x is converted to p = funcname().
-
- SpecialFree # Like SpecialMalloc, but defines a special
- SpecialFree # function for freeing things of a given type.
-
- SpecialSizeOf # Like SpecialMalloc, but defines a name or
- SpecialSizeOf # other integer-valued C expression which is
- SpecialSizeOf # the size of an object of the given type.
-
- AvoidName getc # If any of these names appear in the code,
- AvoidName putc # use an alternate name so as to avoid
- AvoidName getchar # library conflicts.
- AvoidName putchar
- AvoidName feof # These are typically macro names whose use
- AvoidName ferror # would be disasterous under any
- AvoidName clearerr # circumstances.
- AvoidName fileno
- AvoidName BUFSIZ NULL EOF
- AvoidName stdin stdout stderr
- AvoidName true false assert
- AvoidName Anyptr Void Char PP PV
- AvoidName Signed Const Volatile Register Static Local Inline
- AvoidName cdecl far near huge
- AvoidName isalpha isupper islower isdigit isxdigit isspace ispunct
- AvoidName isalnum isprint isgraph iscntrl isascii toascii
- AvoidName toupper tolower
- AvoidName LINK SEXT
-
- AvoidGlobalName fopen # These names should be avoided in global
- AvoidGlobalName fclose # contexts, but they are okay as local names.
- AvoidGlobalName fseek
- AvoidGlobalName exit main
- AvoidGlobalName strcpy strcat
- AvoidGlobalName printf fprintf sprintf
- AvoidGlobalName scanf fscanf sscanf
- AvoidGlobalName malloc realloc free
- AvoidGlobalName y0 y1 yn j0 j1 jn # from math.h -- urghhh!
- # ... we should define lots more of these!
-
- WarnName # A similar list of names to leave alone, but
- WarnName # generate warnings for if they are defined.
-
- WarnNames # 1=All vars, consts, types, procs, fields
- # defined after this point should generate
- # warnings if used.
- # 0 or default=no warnings for future names
-
- WarnLibrary # A list of C functions, any calls to which
- WarnLibrary # should generate warnings.
-
-
-
-
-
-